Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh: Fix 'if:' statement to avoid multiple uploads #326

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

cfergeau
Copy link
Collaborator

@cfergeau cfergeau commented Feb 1, 2024

actions/upload-artifact will fail if we try to upload multiple times
the same artifact, which can happen in our setup with the matrix of go
versions:

Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

I tried to fix this before, but I got the if: condition wrong in the
workflow YAML file:
if: matrix.go-version == '1.21.x' should work better than if: ${{ matrix.go-version }} == '1.21.x'

`actions/upload-artifact` will fail if we try to upload multiple times
the same artifact, which can happen in our setup with the matrix of go
versions:
```
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
```

I tried to fix this before, but I got the `if:` condition wrong in the
workflow YAML file:
`if: matrix.go-version == '1.21.x'` should work better than `if: ${{ matrix.go-version }} == '1.21.x'`

Signed-off-by: Christophe Fergeau <[email protected]>
@openshift-ci openshift-ci bot added the approved label Feb 1, 2024
@cfergeau
Copy link
Collaborator Author

cfergeau commented Feb 5, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Feb 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jakecorrenti
Copy link
Member

/lgtm

Copy link
Contributor

openshift-ci bot commented Feb 5, 2024

@jakecorrenti: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: Christophe Fergeau <[email protected]>
@baude
Copy link
Member

baude commented Feb 5, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Feb 5, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit c62637d into containers:main Feb 5, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants